package thread;

import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
            try {
                for (;i>=0;i--){
                    System.out.println(i);
                    Thread.sleep(1000);
                }

            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        System.out.println("程序结束了");
    }
}
